.leaderboard {
  padding: 16px 0;
}

.header {
  margin-bottom: 16px;
  padding: 0 16px;
}

.leaderboardTable {
  border-radius: 8px;
  overflow: hidden;
}

.leaderboardTable :global(.ant-table-thead > tr > th) {
  background-color: var(--background-light);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-primary);
}

.leaderboardTable :global(.ant-table-tbody > tr > td) {
  border-bottom: 1px solid var(--border-color-light);
}

.leaderboardTable :global(.ant-table-tbody > tr:hover > td) {
  background-color: var(--background-hover);
}

.rankCell {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.solvedCountCell {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.solvedCountCell:hover {
  opacity: 0.8;
}

.problemDetails {
  max-width: 400px;
  max-height: 500px;
  overflow-y: auto;
}

.problemDetailsHeader {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color-light);
}

.problemDetailsList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.problemDetailItem {
  padding: 6px 8px;
  border-radius: 4px;
  background-color: var(--background-light);
  border: 1px solid var(--border-color-light);
  margin-bottom: 4px;
}

.problemDetailRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.problemInfo {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.problemInfo > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.problemStatus {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.problemDetailsPopover {
  max-width: 450px;
}

.problemDetailsPopover :global(.ant-popover-inner) {
  padding: 16px;
}

.problemDetailsPopover :global(.ant-popover-arrow) {
  display: none;
}

.problemHeader {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
  min-width: 100px;
}

.problemHeader > div:first-child {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.problemStatus {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: var(--text-secondary);
}

.noData {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: var(--text-secondary);
}

.noLeaderboard {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: var(--text-secondary);
  background-color: var(--background-light);
  border-radius: 8px;
  border: 1px dashed var(--border-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .problemHeader {
    min-width: 80px;
  }
  
  .problemHeader > div:first-child {
    font-size: 11px;
  }
  
  .leaderboardTable {
    font-size: 12px;
  }
}
